package com.gxa.ehome.pojo;

import java.util.ArrayList;
import java.util.List;

public class Category {

    private Integer id;
    private Integer pid;
    private String pname;
    private String name;
//在一对多的查询中,要在一个地方添加集合 集合类型设置为多的一方

    private List<Goods> goodsList=new ArrayList <>();

    public List <Goods> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List <Goods> goodsList) {
        this.goodsList = goodsList;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Category{" +
                "id=" + id +
                ", pid=" + pid +
                ", pname='" + pname + '\'' +
                ", name='" + name + '\'' +
                ", goodsList='" + goodsList + '\'' +
                '}';
    }
}
